//location.js
//获取应用实例
var width;
var height;
var emptyline = require('../../utils/空.js')
var lalo = require('../../utils/lalo.js')
var HDCJline = require('../../utils/华东交通大学.js')
var JXCJline = require('../../utils/江西财经大学.js')
var JXLGline = require('../../utils/江西理工大学.js')
var NCDXline = require('../../utils/南昌大学.js')
var NCHKline = require('../../utils/南昌航空大学.js')
var JXSFline = require('../../utils/江西师范大学.js')
var JXNYline = require('../../utils/江西农业大学.js')
var JXZYYline = require('../../utils/江西中医药大学.js')
var DHLGline = require('../../utils/东华理工大学.js')
var JXKJSFline = require('../../utils/江西科技师范大学.js')
var NCGCXYline = require('../../utils/南昌工程学院.js')
var NCSFXYline = require('../../utils/南昌师范学院.js')
var JXJCXYline = require('../../utils/江西警察学院.js')
var YZSFXYline = require('../../utils/豫章师范学院.js')
var JXKJXYline = require('../../utils/江西科技学院.js')
var JXFZXYline = require('../../utils/江西服装学院.js')
var NCGXYline = require('../../utils/南昌工学院.js')
var NCLGXYline = require('../../utils/南昌理工学院.js')
const innerAudioContext = wx.createInnerAudioContext()
wx.getSystemInfo({
  success: function (res) {
    width = res.windowWidth;
    height = res.windowHeight;
  }
});
var controlRight = parseInt(width) * 0.1;
var app = getApp();
Page({
  data: {
    //返回当前轨迹的id
    id: '',
    //用于判断当前行走轨迹是否有一次在预定路线
    count: '',
    //表示当前是第几次记录轨迹,默认为1
    count1: 1,
    //如果是第二次记录轨迹先判断是否清空路线
    count2: 1,
    flag: true,
    phone: '',
    scale: 15,
    longitude: '',
    latitude: '',
    width: width,
    height: height,
    polyline: emptyline.polyline,
    markers: [
    ],
    controls: [
      {
        id: 1,
        iconPath: '../../image/search.png',
        position: {
          width: width,
          height: 50,
          top: 20,
          right: controlRight
        },
        clickable: true
      },
      {
        id: 2,
        iconPath: '../../image/jia.png',
        position: {
          width: 30,
          height: 30,
          top: 100,
          left: 30
        },
        clickable: true
      },
      {
        id: 3,
        iconPath: '../../image/jian.png',
        position: {
          width: 30,
          height: 30,
          top: 130,
          left: 30
        },
        clickable: true
      },
      {
        id: 4,
        iconPath: '../../image/location-control.png',
        position: {
          width: 30,
          height: 30,
          top: 200,
          left: 30
        },
        clickable: true
      },
      {
        id: 5,
        iconPath: '../../image/route.png',
        position: {
          width: 40,
          height: 40,
          top: 300,
          left: 25
        },
        clickable: true
      }, {

        id: 6,
        iconPath: '../../image/circle2.png',
        position: {
          width: 35,
          height: 35,
          top: 400,
          left: 30
        },
        clickable: true
      }, {
        id: 7,
        iconPath: '../../image/remind.png',
        position: {
          width: 30,
          height: 30,
          top: 450,
          left: 35
        },
        clickable: true
      }
    ]
  },

  clickMap(e) {
    var poi = e.detail;
    var that = this;
    console.log(poi.latitude + ',' + poi.longitude);
  },

  onShow: function () { },

  onReady: function () {
    var that = this
    //var status = app.appData.systemUser.status;

    var polyline = this.data.polyline
    that.setTimeoutEvent3 = setInterval(function () {
      wx.getLocation({
        success: function (res) {
          var latitude = 28.6630645090//res.latitude
          var longitude = 115.9175580740  //res.longitude
          if (Math.abs(28.7374516490 - latitude)
            < 0.0009 &&
            Math.abs(115.8885043859 - longitude) < 0.0009) {
            innerAudioContext.src = 'http://ws.stream.qqmusic.qq.com/M500001VfvsJ21xFqb.mp3?guid=ffffffff82def4af4b12b3cd9337d5e7&uin=346897220&vkey=6292F51E1E384E061FF02C31F716658E5C81F5594D561F2E88B854E81CAAB7806D5E4F103E55D33C16F3FAC506D1AB172DE8600B37E43FAD&fromtag=46'
            innerAudioContext.play()
            console.info('到达孔目湖景区')
          }
          else if (Math.abs(28.7129848743 - latitude)
            < 0.0009 &&
            Math.abs(115.9161150455 - longitude) < 0.0009) {
            innerAudioContext.src = 'http://ws.stream.qqmusic.qq.com/M500001VfvsJ21xFqb.mp3?guid=ffffffff82def4af4b12b3cd9337d5e7&uin=346897220&vkey=6292F51E1E384E061FF02C31F716658E5C81F5594D561F2E88B854E81CAAB7806D5E4F103E55D33C16F3FAC506D1AB172DE8600B37E43FAD&fromtag=46'
            innerAudioContext.play()
            console.info('到达英雄大桥景区')
          }
          else if (Math.abs(28.6936369694 - latitude)
            < 0.0009 &&
            Math.abs(115.9231638908 - longitude) < 0.0009) {
            innerAudioContext.src = 'http://ws.stream.qqmusic.qq.com/M500001VfvsJ21xFqb.mp3?guid=ffffffff82def4af4b12b3cd9337d5e7&uin=346897220&vkey=6292F51E1E384E061FF02C31F716658E5C81F5594D561F2E88B854E81CAAB7806D5E4F103E55D33C16F3FAC506D1AB172DE8600B37E43FAD&fromtag=46'
            innerAudioContext.play()
            console.info('到达青山湖景区')
          }
        },

      })



    }, 5000)

    // if(status=='未登录'){
    //   wx.redirectTo({
    //     url: '../login/login',
    //     success: function(){
    //       wx.hideTabBar({
    //         aniamtion:true,
    //         success:function(){
    //     }
    //       });
    //     },
    //     fail:function(e){
    //      console.log('eeeeeeeeeeeeeeee'+e)
    //     }
    //   })
    // }
    var that = this;
    wx.getLocation({
      type: 'gcj02',
      //返回可以用于wx.openLocation的经纬度
      success: function (res) {
        that.setData({
          latitude: res.latitude,
          longitude: res.longitude,
        })
      }
    });

  },
  controltap(e) {
    var that = this;
    //地图放大控件
    if (e.controlId == 2) {
      that.setData({
        scale: ++that.data.scale
      });
    }
    //地图缩小控件
    else if (e.controlId == 3) {
      that.setData({
        scale: --that.data.scale
      });
    }
    //进入搜索地点
    else if (e.controlId == 1) {
      var that=this;//;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
      wx.chooseLocation({
        success: function (res) {
          console.log(res.name);
          if(res.name.indexOf("华东交通大学")!=-1)
          {
            console.log("包含华东交通大学");
               //更新数据
               var markers=that.setMarkershdjtdx(res.latitude,res.longitude,"");
            //更新数据
            that.setData({
              markers:markers,
                polyline:HDCJline.polyline
              });
          }else if(res.name.indexOf("江西财经大学")!=-1)
          {
            console.log("包含江西财经大学");
              //更新数据
              var markers=that.setMarkersjxcjdx(res.latitude,res.longitude,"");
              //更新数据
              that.setData({
                markers:markers,
                polyline:JXCJline.polyline
              });
          }else if(res.name.indexOf("江西理工大学")!=-1)
          {
            console.log("包含江西理工大学");
               //更新数据
               var markers=that.setMarkersjxlgdx(res.latitude,res.longitude,"");
            //更新数据
            that.setData({
              markers:markers,
                polyline:JXLGline.polyline
              });
          }else if(res.name.indexOf("南昌大学")!=-1)
          {
            console.log("包含南昌大学");
            //刷新页面
            var markers=that.setMarkersncdx(res.latitude,res.longitude,"");
              //更新数据
              that.setData({
                markers:markers,
                polyline:NCDXline.polyline
              });
          }
          else if(res.name.indexOf("南昌航空大学")!=-1)
          {
            console.log("包含南昌航空大学");
            //刷新页面
            var markers=that.setMarkersnchkdx(res.latitude,res.longitude,"");
              //更新数据
              that.setData({
                markers:markers,
                polyline:NCHKline.polyline
              });
          }else if(res.name.indexOf("江西师范大学")!=-1)
          {
            console.log("包含江西师范大学");
              //更新数据
             //刷新页面
            var markers=that.setMarkersjxsfdx(res.latitude,res.longitude,"");
            //更新数据
            that.setData({
              markers:markers,
                polyline:JXSFline.polyline
              });
          }else if(res.name.indexOf("江西农业大学")!=-1)
          {
            console.log("包含江西农业大学");
              //更新数据
              var markers=that.setMarkersjxnydx(res.latitude,res.longitude,"");
            //更新数据
            that.setData({
              markers:markers,
                polyline:JXNYline.polyline
              });
          }else if(res.name.indexOf("江西中医药大学")!=-1)
          {
            console.log("包含江西中医药大学");
              //更新数据
              var markers=that.setMarkersjxzyydx(res.latitude,res.longitude,"");
              //更新数据
              that.setData({
                markers:markers,
                polyline:JXZYYline.polyline
              });
          }else if(res.name.indexOf("东华理工大学")!=-1)
          {
            console.log("包含东华理工大学");
             //刷新页面
             var markers=that.setMarkersdhlgdx(res.latitude,res.longitude,"");
              //更新数据
              that.setData({
                markers:markers,
                polyline:DHLGline.polyline
              });
          }else if(res.name.indexOf("江西科技师范大学")!=-1)
          {
            console.log("包含江西科技师范大学");
              //更新数据
              var markers=that.setMarkersjxkjsfdx(res.latitude,res.longitude,"");
              //更新数据
              that.setData({
                markers:markers,
                polyline:JXKJSFline.polyline
              });
          }else if(res.name.indexOf("南昌工程学院")!=-1)
          {
            console.log("包含南昌工程学院");
              //更新数据
              var markers=that.setMarkersncgcxy(res.latitude,res.longitude,"");
              //更新数据
              that.setData({
                markers:markers,
                polyline:NCGCXYline.polyline
              });
          }else if(res.name.indexOf("南昌师范学院")!=-1)
          {
            console.log("包含南昌师范学院");
              //更新数据
              var markers=that.setMarkersncsfxy(res.latitude,res.longitude,"");
            //更新数据
            that.setData({
              markers:markers,
                polyline:NCSFXYline.polyline
              });
          }else if(res.name.indexOf("江西警察学院")!=-1)
          {
            console.log("包含江西警察学院");
              //更新数据
              var markers=that.setMarkersjxjcxy(res.latitude,res.longitude,"");
              //更新数据
              that.setData({
                markers:markers,
                polyline:JXJCXYline.polyline
              });
          }else if(res.name.indexOf("豫章师范学院")!=-1)
          {
            console.log("包含豫章师范学院");
              //更新数据
              var markers=that.setMarkersyzsfxy(res.latitude,res.longitude,"");
            //更新数据
            that.setData({
              markers:markers,
                polyline:YZSFXYline.polyline
              });
          }else if(res.name.indexOf("江西科技学院")!=-1)
          {
            console.log("包含江西科技学院");
              //更新数据
              var markers=that.setMarkersjxkjxy(res.latitude,res.longitude,"");
              //更新数据
              that.setData({
                markers:markers,
                polyline:JXKJXYline.polyline
              });
          }else if(res.name.indexOf("江西服装学院")!=-1)
          {
            console.log("包含江西服装学院");
              //更新数据
              var markers=that.setMarkersjxfzxy(res.latitude,res.longitude,"");
              //更新数据
              that.setData({
                markers:markers,
                polyline:JXFZXYline.polyline
              });
          }else if(res.name.indexOf("南昌工学院")!=-1)
          {
            console.log("包含南昌工学院");
              //更新数据
              var markers=that.setMarkersncgxy(res.latitude,res.longitude,"");
              //更新数据
              that.setData({
                markers:markers,
                polyline:NCGXYline.polyline
              });
          }else if(res.name.indexOf("南昌理工学院")!=-1)
          {
            console.log("包含南昌理工学院");
              //更新数据
              var markers=that.setMarkersnclgxy(res.latitude,res.longitude,"");
              //更新数据
              that.setData({
                markers:markers,
                polyline:NCLGXYline.polyline
              });
          }
          else 
          {
            console.log("没用搜索到大学地址");
            //更新数据
            that.setData({
              polyline:emptyline.polyline
            });
          }
          //wx.openLocation({
            //latitude: res.latitude,
            //longitude: res.longitude,
           // name: res.name
         // })
          //刷新页面数据
        },
        fail: function () {
          console.log('选择位置出错!');
        }
      })
    }
    //点击中心空间，获得当前的位置
    else if (e.controlId == 4) {
      var that = this;
      wx.getLocation({
        type: 'gcj02',
        success: function (res) {
          that.setData({
            latitude: res.latitude,
            longitude: res.longitude,
          })
        },
      })
    }
    //点击路线空间，跳转到搜索页面
    else if (e.controlId == 5) {
      wx.navigateTo({
        url: '../../pages/detail/detail',
        success: function () {
          console.log('跳转成功')
        },
        fail: function () {
          console.log('跳转失败');
        }
      })
    }
    //行走记录
    else if (e.controlId == 6) {
      var polyline = this.data.polyline
      var points = polyline[1].points
      if (this.data.controls[5].iconPath == '../../image/circle1.png') {
        //每次重新记录轨迹都先把原来路线清空    
        polyline[1].points = []
        clearInterval(this.setTimeoutEvent1);
        this.data.controls[5].iconPath = '../../image/circle2.png';
      }
      else {
        var id = this.data.id;
        var latlon = new Object();
        var count1 = this.data.count1
        var userId = app.appData.systemUser.id;
        var phone = app.appData.systemUser.phone;
        this.data.controls[5].iconPath = '../../image/circle1.png';
        //定时器，每5秒获取一次当前位置
        that.setTimeoutEvent1 = setInterval(function () {
          wx.getLocation({
            type: 'gcj02', //返回可以用于wx.openLocation的经纬度
            success: function (res) {
              polyline[1].points.push({
                latitude: res.latitude,
                longitude: res.longitude
              });

              var len = polyline[1].points.length;
              var dis=0;
              for (var i = 0; i <len; i++)
               {
                 if(i!=len-1)
                 {
                    var distance = that.distance(
                    polyline[1].points[i].latitude, polyline[1].points[i].longitude,
                    polyline[1].points[i+1].latitude, polyline[1].points[i+1].longitude);
                    dis =dis+ distance;
                    console.log("距离为：", dis, "千米")
                 }
               }
              var markers=that.setMarkers(res.latitude,res.longitude, dis+"千米");
              //更新经纬度和线路
              that.setData({
                markers: markers,
                polyline: polyline,
              });
            }
          });

          var points = polyline[1].points;

          //第一次请求，创建一个新的latlon
          if (count1 == 1) {
            wx.request({
              url: app.appData.contextPath + 'latlonServlet',
              data: {
                latlon: JSON.stringify(points),
                userId: userId,
                phone: phone
              },
              success: function (res) {
                id = res.data
              },
              header: {
                'content-type': 'application/json' // 默认值
              }
            })
            count1 = 2;
          }

          //第二次及其以后，则更改其中latlon
          else {
            wx.request({
              url: app.appData.contextPath + 'pointsServlet',
              data: {
                latlon: JSON.stringify(points),
                id: id,
                userId: app.appData.systemUser.id,
                phone: phone
              },
              header: {
                'content-type': 'application/json' // 默认值
              }
            })
          }
        }, 5000);



      }

      //更新数据
      this.setData({
        controls: this.data.controls,
        polyline: polyline
      });

    }
    //判断用户是否在正确路线上，如不则会语音提示
    else if (e.controlId == 7) {

      if (this.data.controls[6].iconPath == '../../image/ringremind.png') {
        this.data.controls[6].iconPath = '../../image/remind.png';
        innerAudioContext.stop();
        clearInterval(this.setTimeoutEvent2);
      }
      else {
        innerAudioContext.src = 'http://ws.stream.qqmusic.qq.com/M500001VfvsJ21xFqb.mp3?guid=ffffffff82def4af4b12b3cd9337d5e7&uin=346897220&vkey=6292F51E1E384E061FF02C31F716658E5C81F5594D561F2E88B854E81CAAB7806D5E4F103E55D33C16F3FAC506D1AB172DE8600B37E43FAD&fromtag=46'
        innerAudioContext.play()
        console.info('开始监听行程')

        this.data.controls[6].iconPath = '../../image/ringremind.png';
        var points = this.data.polyline[0].points
        var flag = this.data.flag
        var count = this.data.count
        //每五秒计时一次
        that.setTimeoutEvent2 = setInterval(function () {
          wx.getLocation({
            type: 'gcj02',
            success: function (res) {
              var latitude = res.latitude
              var longitude = res.longitude
            },
          })
          count = 0
          for (var i = 0; i < points.length; i++) {
            if (Math.abs(points[i].latitude - latitude)
              < 0.0003 &&
              Math.abs(points[i].longitude - longitude) < 0.0003) {
              count = 1
              break;

            }
          }
          console.info(points.length)
          console.info(latitude)
          console.info(longitude)
          console.info(count)
          if (count == 1) {
            flag = true
          }
          else {
            flag = false
          }
          if (!flag) {
            innerAudioContext.src = 'http://ws.stream.qqmusic.qq.com/M500001VfvsJ21xFqb.mp3?guid=ffffffff82def4af4b12b3cd9337d5e7&uin=346897220&vkey=6292F51E1E384E061FF02C31F716658E5C81F5594D561F2E88B854E81CAAB7806D5E4F103E55D33C16F3FAC506D1AB172DE8600B37E43FAD&fromtag=46'
            innerAudioContext.play()
            console.info('位置错误')
          }
          else {
            innerAudioContext.stop()
            if (Math.abs(points[457].latitude - latitude)
              < 0.0003 &&
              Math.abs(points[457].longitude - longitude) < 0.0003) {
              innerAudioContext.src = 'https://y.qq.com/portal/player.html'
              innerAudioContext.play()
              console.info('到达目的地')
            }
          }
        }, 5000);
      }
      this.setData({
        controls: this.data.controls
      });
    }
  },

  /**
     * @desc 由经纬度计算两点之间的距离，la为latitude缩写，lo为longitude
     * @param la1 第一个坐标点的纬度
     * @param lo1 第一个坐标点的经度
     * @param la2 第二个坐标点的纬度
     * @param lo2 第二个坐标点的经度
     * @return (int)s   返回距离(单位千米或公里)
     * @tips 注意经度和纬度参数别传反了，一般经度为0~180、纬度为0~90
     * 具体算法不做解释，有兴趣可以了解一下球面两点之间最短距离的计算方式
     */
    distance: function (la1, lo1, la2, lo2) {
      var La1 = la1 * Math.PI / 180.0;
      var La2 = la2 * Math.PI / 180.0;
      var La3 = La1 - La2;
      var Lb3 = lo1 * Math.PI / 180.0 - lo2 * Math.PI / 180.0;
      var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(La3 / 2), 2) + Math.cos(La1) * Math.cos(La2) * Math.pow(Math.sin(Lb3 / 2), 2)));
      s = s * 6378.137;
      s = Math.round(s * 10000) / 10000;
      console.log(s);
      s = Math.round(s*100)/100;
      return s;
    },

    //图片跳转方法
//南昌大学
setMarkersncdx: function (la1, lo1, dis) {
  var that = this;
  that.data.markers=[];
  that.data.markers.push({
    iconPath: '../../image/0.gif',
    title: '南昌站',

    id: 11,
    latitude: 28.662991163527906,
    longitude: 115.91763209358216,
    width: 25,
    height: 25,
  });
  that.data.markers.push({
    iconPath: 'http://img1.image.lfang.com/2014_03/201403271600027598.jpg',
    title: '王府井',

    id: 12,
    latitude: 28.655085775311985,
    longitude: 115.90532720088959,
    width: 25,
    height: 25
  });
  that.data.markers.push({
    iconPath: 'http://image.qmango.com/upload/2013816114926.jpg',
    title: '红谷桃园',

    id: 13,
    latitude: 28.66520618963856,
    longitude: 115.85351765155792,
    width: 35,
    height: 25
  });
  that.data.markers.push({
    iconPath: 'http://pic.shuoshuokong.com/d/file/2019-03/427ffd256058f9f4be7c139e2042dedc.png',
    title: '南昌航空大学',

    id: 15,
    latitude: 28.656926351254995,
    longitude:115.82887351512909,
    width: 35,
    height: 25
  });
  that.data.markers.push({
    iconPath: 'http://bbs-fd.zol-img.com.cn/t_s1200x5000/g5/M00/04/0A/ChMkJ1wB0DqIeAY0AANaLwmHznwAAtgtgI_kMcAA1pH210.jpg',
    title: '南昌大学',

    id: 14,
    latitude: 28.656427374780094,
    longitude: 115.80183148384094,
    width: 25,
    height: 30
  });
  return that.data.markers;
},
//江西师范大学
setMarkersjxsfdx: function (la1, lo1, dis) {
  var that = this;
  that.data.markers=[];
  that.data.markers.push({
    iconPath: '../../image/0.gif',
    title: '南昌站',

    id: 31,
    latitude: 28.662991163527906,
    longitude: 115.91763209358216,
    width: 25,
    height: 25,
  });
  that.data.markers.push({
    iconPath: 'https://img1.qunarzz.com/piao/fusion/2007/d5/5edb23c20d0e7c02.jpg_r_480x360x95_abe5fccf.jpg',
    title: '南昌海洋公园',

    id: 32,
    latitude: 28.674374911957738,
    longitude: 115.9773337841034,
    width: 25,
    height: 25
  });
  /*that.data.markers.push({
    iconPath: '../../image/2.gif',
    title: '太子殿',

    id: 33,
    latitude: 28.67479379232362,
    longitude: 116.01111888885498,
    width: 35,
    height: 25
  });*/
  that.data.markers.push({
    iconPath: 'http://file.koolearn.com/2013/0821/20130821110504271.jpg',
    title: '江西师范大学',

    id: 33,
    latitude: 28.675297387849664,
    longitude:116.03279113769531,
    width: 25,
    height: 30
  });
  return that.data.markers;
},
//江西财经大学
setMarkersjxcjdx: function (la1, lo1, dis) {
  var that = this;
  that.data.markers=[];
  that.data.markers.push({
    iconPath: '../../image/0.gif',
    title: '南昌站',

    id: 151,
    latitude: 28.662991163527906,
    longitude: 115.91763209358216,
    width: 25,
    height: 25,
  });
  that.data.markers.push({
    iconPath: '../../image/1.gif',
    title: '检测大厦',

    id: 152,
    latitude: 28.66371,
    longitude: 115.92804,
    width: 25,
    height: 25
  });
  that.data.markers.push({
    iconPath: 'http://storage.travel.sina.com.cn/jingdian/201309181811596690_20120223_164610_jdtupload_1557_0.jpg',
    title: '青山湖景区',

    id: 153,
    latitude: 28.693688345437906,
    longitude: 115.92312525764466,
    width: 35,
    height: 25
  });
  that.data.markers.push({
    iconPath: 'http://n.sinaimg.cn/sinacn20190624s/74/w500h374/20190624/7466-hyvnhqq4940774.jpg',
    title: '英雄大桥',

    id: 154,
    latitude: 28.714432490959112,
    longitude: 115.9147747094345,
    width: 25,
    height: 30
  });
  that.data.markers.push({
    iconPath: 'http://jiangxi.sinaimg.cn/2014/0730/U8827P1332DT20140730145833.png',
    title: '孔目湖',

    id: 155,
    latitude: 28.738840131557982,
    longitude: 115.88743227073668,
    width: 30,
    height: 25
  });
  that.data.markers.push({
    iconPath: 'http://img.gaokaohelp.com/article/172/2_20180802140824_qj4z2.png',
    title: '江西财经大学',

    id: 41,
    latitude: 28.74330288028242,
    longitude: 115.85465490818024,
    width: 30,
    height: 25
  });
  return that.data.markers;
},
//江西农业大学
setMarkersjxnydx: function (la1, lo1, dis) {
  var that = this;
  that.data.markers=[];
  that.data.markers.push({
    iconPath: '../../image/0.gif',
    title: '南昌站',

    id: 151,
    latitude: 28.662991163527906,
    longitude: 115.91763209358216,
    width: 25,
    height: 25,
  });
  that.data.markers.push({
    iconPath: '../../image/1.gif',
    title: '检测大厦',

    id: 152,
    latitude: 28.66371,
    longitude: 115.92804,
    width: 25,
    height: 25
  });
  that.data.markers.push({
    iconPath: 'http://storage.travel.sina.com.cn/jingdian/201309181811596690_20120223_164610_jdtupload_1557_0.jpg',
    title: '青山湖景区',

    id: 153,
    latitude: 28.693688345437906,
    longitude: 115.92312525764466,
    width: 35,
    height: 25
  });
  that.data.markers.push({
    iconPath: 'http://n.sinaimg.cn/sinacn20190624s/74/w500h374/20190624/7466-hyvnhqq4940774.jpg',
    title: '英雄大桥',

    id: 154,
    latitude: 28.714432490959112,
    longitude: 115.9147747094345,
    width: 25,
    height: 30
  });
  that.data.markers.push({
    iconPath: 'http://jiangxi.sinaimg.cn/2014/0730/U8827P1332DT20140730145833.png',
    title: '孔目湖',

    id: 155,
    latitude: 28.738840131557982,
    longitude: 115.88743227073668,
    width: 30,
    height: 25
  });
  that.data.markers.push({
    iconPath: 'http://img.gaokaohelp.com/article/172/2_20180802140824_qj4z2.png',
    title: '江西财经大学',

    id: 41,
    latitude: 28.74330288028242,
    longitude: 115.85465490818024,
    width: 30,
    height: 25
  });
  that.data.markers.push({
    iconPath: 'http://5b0988e595225.cdn.sohucs.com/images/20180505/15269cacb21b4ba6ad4bfbc1012d0e9a.jpeg',
    title: '江西农业大学',

    id: 51,
    latitude: 28.75735578481158,
    longitude: 115.83245694637299,
    width: 30,
    height: 25
  });
  return that.data.markers;
},
//江西中医药大学
setMarkersjxzyydx: function (la1, lo1, dis) {
  var that = this;
  that.data.markers=[];
  that.data.markers.push({
    iconPath: '../../image/0.gif',
    title: '南昌站',

    id: 11,
    latitude: 28.662991163527906,
    longitude: 115.91763209358216,
    width: 25,
    height: 25,
  });
  that.data.markers.push({
    iconPath: 'http://img1.image.lfang.com/2014_03/201403271600027598.jpg',
    title: '王府井',

    id: 12,
    latitude: 28.655085775311985,
    longitude: 115.90532720088959,
    width: 25,
    height: 25
  });
  that.data.markers.push({
    iconPath: 'http://image.qmango.com/upload/2013816114926.jpg',
    title: '红谷桃园',

    id: 13,
    latitude: 28.66520618963856,
    longitude: 115.85351765155792,
    width: 35,
    height: 25
  });
  that.data.markers.push({
    iconPath: 'http://pic.shuoshuokong.com/d/file/2019-03/427ffd256058f9f4be7c139e2042dedc.png',
    title: '南昌航空大学',

    id: 15,
    latitude: 28.656926351254995,
    longitude:115.82887351512909,
    width: 35,
    height: 25
  });
  that.data.markers.push({
    iconPath: 'http://5b0988e595225.cdn.sohucs.com/images/20190706/5703e46828434f19a75608c6dc1b2186.jpeg',
    title: '豫章师范学院',

    id: 66,
    latitude:28.661628852502187,
    longitude:115.77835142612457,
    width: 35,
    height: 25
  });
  that.data.markers.push({
    iconPath: 'http://www.555edu.com/d/file/2017-11-06/9898594d6640e9d923ecbab94043949c.jpg',
    title: '江西中医药大学',

    id: 65,
    latitude:28.674544346914193,
    longitude:115.75459778308868,
    width: 35,
    height: 25
  });
  return that.data.markers;
},
//华东交通大学
setMarkershdjtdx: function (la1, lo1, dis) {
  var that = this;
  that.data.markers=[];
  that.data.markers.push({
    iconPath: '../../image/0.gif',
    title: '南昌站',

    id: 151,
    latitude: 28.662991163527906,
    longitude: 115.91763209358216,
    width: 25,
    height: 25,
  });
  that.data.markers.push({
    iconPath: '../../image/1.gif',
    title: '检测大厦',

    id: 152,
    latitude: 28.66371,
    longitude: 115.92804,
    width: 25,
    height: 25
  });
  that.data.markers.push({
    iconPath: 'http://storage.travel.sina.com.cn/jingdian/201309181811596690_20120223_164610_jdtupload_1557_0.jpg',
    title: '青山湖景区',

    id: 153,
    latitude: 28.693688345437906,
    longitude: 115.92312525764466,
    width: 35,
    height: 25
  });
  that.data.markers.push({
    iconPath: 'http://n.sinaimg.cn/sinacn20190624s/74/w500h374/20190624/7466-hyvnhqq4940774.jpg',
    title: '英雄大桥',

    id: 154,
    latitude: 28.714432490959112,
    longitude: 115.9147747094345,
    width: 25,
    height: 30
  });
  that.data.markers.push({
    iconPath: 'http://jiangxi.sinaimg.cn/2014/0730/U8827P1332DT20140730145833.png',
    title: '孔目湖',

    id: 155,
    latitude: 28.738840131557982,
    longitude: 115.88743227073668,
    width: 30,
    height: 25
  });
  that.data.markers.push({
    iconPath: 'http://www.isixue.com/uploads/20181022/da6ea1ef279b387c64edb337a74bfce4.jpg',
    title: '华东交通大学',

    id: 71,
    latitude: 28.743716781335703,
    longitude: 115.86854875087738,
    width: 30,
    height: 25
  });
  return that.data.markers;
},
//东华理工大学
setMarkersdhlgdx: function (la1, lo1, dis) {
  var that = this;
  that.data.markers=[];
  that.data.markers.push({
    iconPath: '../../image/0.gif',
    title: '南昌站',

    id: 11,
    latitude: 28.662991163527906,
    longitude: 115.91763209358216,
    width: 25,
    height: 25,
  });
  that.data.markers.push({
    iconPath: 'http://img1.image.lfang.com/2014_03/201403271600027598.jpg',
    title: '王府井',

    id: 12,
    latitude: 28.655085775311985,
    longitude: 115.90532720088959,
    width: 25,
    height: 25
  });
  that.data.markers.push({
    iconPath: 'http://image.qmango.com/upload/2013816114926.jpg',
    title: '红谷桃园',

    id: 13,
    latitude: 28.66520618963856,
    longitude: 115.85351765155792,
    width: 35,
    height: 25
  });
  that.data.markers.push({
    iconPath: 'http://pic103.huitu.com/res/20180118/113784_20180118230504871020_1.jpg',
    title: '礼步湖公园',

    id: 85,
    latitude: 28.6856605638077,
    longitude: 115.82531154155731,
    width: 35,
    height: 25
  });
  that.data.markers.push({
    iconPath: 'http://5b0988e595225.cdn.sohucs.com/images/20180625/4549f621bd324a069b48a4cf31db9699.jpeg',
    title: '东华理工大学',

    id: 84,
    latitude: 28.718531680232214,
    longitude: 115.82811176776886,
    width: 25,
    height: 30
  });
  return that.data.markers;
},

//南昌航空大学
setMarkersnchkdx: function (la1, lo1, dis) {
  var that = this;
  that.data.markers=[];
  that.data.markers.push({
    iconPath: '../../image/0.gif',
    title: '南昌站',

    id: 11,
    latitude: 28.662991163527906,
    longitude: 115.91763209358216,
    width: 25,
    height: 25,
  });
  that.data.markers.push({
    iconPath: 'http://img1.image.lfang.com/2014_03/201403271600027598.jpg',
    title: '王府井',

    id: 12,
    latitude: 28.655085775311985,
    longitude: 115.90532720088959,
    width: 25,
    height: 25
  });
  that.data.markers.push({
    iconPath: 'http://image.qmango.com/upload/2013816114926.jpg',
    title: '红谷桃园',

    id: 13,
    latitude: 28.66520618963856,
    longitude: 115.85351765155792,
    width: 35,
    height: 25
  });
  that.data.markers.push({
    iconPath: 'https://att01.zjut.cc/attachment/college/album/big/bb/163133eklsvvl2vvtcy8x8.jpg',
    title: '南昌航空大学',

    id: 94,
    latitude: 28.651042043597286,
    longitude: 115.82920610904694,
    width: 35,
    height: 25
  });
  return that.data.markers;
},
//江西科技师范大学
setMarkersjxkjsfdx: function (la1, lo1, dis) {
  var that = this;
  that.data.markers=[];
  that.data.markers.push({
    iconPath: '../../image/0.gif',
    title: '南昌站',

    id: 11,
    latitude: 28.662991163527906,
    longitude: 115.91763209358216,
    width: 25,
    height: 25,
  });
  that.data.markers.push({
    iconPath: 'http://img1.image.lfang.com/2014_03/201403271600027598.jpg',
    title: '王府井',

    id: 12,
    latitude: 28.655085775311985,
    longitude: 115.90532720088959,
    width: 25,
    height: 25
  });
  that.data.markers.push({
    iconPath: 'http://image.qmango.com/upload/2013816114926.jpg',
    title: '红谷桃园',

    id: 13,
    latitude: 28.66520618963856,
    longitude: 115.85351765155792,
    width: 35,
    height: 25
  });
  that.data.markers.push({
    iconPath: 'http://img.mp.itc.cn/upload/20170307/f84b8ea92ede4f5d931ecdaeb2ae2ec1_th.jpeg',
    title: '江西科技师范大学',

    id: 104,
    latitude:28.667997369204706,
    longitude:115.82216799259186,
    width: 35,
    height: 25
  });
  
  return that.data.markers;
},
//南昌工程学院
setMarkersncgcxy: function (la1, lo1, dis) {
  var that = this;
  that.data.markers=[];
  that.data.markers.push({
    iconPath: '../../image/0.gif',
    title: '南昌站',

    id: 31,
    latitude: 28.662991163527906,
    longitude: 115.91763209358216,
    width: 25,
    height: 25,
  });
  that.data.markers.push({
    iconPath: 'https://img1.qunarzz.com/piao/fusion/2007/d5/5edb23c20d0e7c02.jpg_r_480x360x95_abe5fccf.jpg',
    title: '南昌海洋公园',

    id: 32,
    latitude: 28.674374911957738,
    longitude: 115.9773337841034,
    width: 25,
    height: 25
  });
  /*that.data.markers.push({
    iconPath: '../../image/2.gif',
    title: '太子殿',

    id: 33,
    latitude: 28.67479379232362,
    longitude: 116.01111888885498,
    width: 35,
    height: 25
  });*/
  that.data.markers.push({
    iconPath: 'http://imaegs.creditsailing.com/article/74/57_20180724090702_xxh9i.png',
    title: '南昌工程学院',

    id: 111,
    latitude: 28.684686412458785,
    longitude:116.032404899597171,
    width: 25,
    height: 30
  });
  return that.data.markers;
},
//南昌师范学院
setMarkersncsfxy: function (la1, lo1, dis) {
  var that = this;
  that.data.markers=[];
  that.data.markers.push({
    iconPath: '../../image/0.gif',
    title: '南昌站',

    id: 11,
    latitude: 28.662991163527906,
    longitude: 115.91763209358216,
    width: 25,
    height: 25,
  });
  that.data.markers.push({
    iconPath: 'http://img1.image.lfang.com/2014_03/201403271600027598.jpg',
    title: '王府井',

    id: 12,
    latitude: 28.655085775311985,
    longitude: 115.90532720088959,
    width: 25,
    height: 25
  });
  that.data.markers.push({
    iconPath: 'http://image.qmango.com/upload/2013816114926.jpg',
    title: '红谷桃园',

    id: 13,
    latitude: 28.66520618963856,
    longitude: 115.85351765155792,
    width: 35,
    height: 25
  });
  that.data.markers.push({
    iconPath: 'http://pic103.huitu.com/res/20180118/113784_20180118230504871020_1.jpg',
    title: '礼步湖公园',

    id: 85,
    latitude: 28.6856605638077,
    longitude: 115.82531154155731,
    width: 35,
    height: 25
  });
  that.data.markers.push({
    iconPath: 'https://www.dxsbb.com/upFiles/infoImg/2018102479176289.png',
    title: '南昌师范学院',

    id: 121,
    latitude: 28.721396709029317,
    longitude: 115.80248594284058,
    width: 25,
    height: 30
  });
  return that.data.markers;
},
//江西警察学院
setMarkersjxjcxy: function (la1, lo1, dis) {
  var that = this;
  that.data.markers=[];
  that.data.markers.push({
    iconPath: '../../image/0.gif',
    title: '南昌站',

    id: 131,
    latitude: 28.662991163527906,
    longitude: 115.91763209358216,
    width: 25,
    height: 25,
  });
  that.data.markers.push({
    iconPath: '../../image/1.gif',
    title: '南昌海洋公园',

    id: 132,
    latitude: 28.674374911957738,
    longitude: 115.9773337841034,
    width: 25,
    height: 25
  });
  that.data.markers.push({
    iconPath: '../../image/2.gif',
    title: '太子殿',

    id: 133,
    latitude: 28.67479379232362,
    longitude: 116.01111888885498,
    width: 35,
    height: 25
  });
  that.data.markers.push({
    iconPath: '../../image/6.gif',
    title: '江西师范大学',

    id: 134,
    latitude: 28.675297387849664,
    longitude:116.03279113769531,
    width: 25,
    height: 30
  });
  return that.data.markers;
},
//豫章师范学院
setMarkersyzsfxy: function (la1, lo1, dis) {
  var that = this;
  that.data.markers=[];
  that.data.markers.push({
    iconPath: '../../image/0.gif',
    title: '南昌站',

    id: 11,
    latitude: 28.662991163527906,
    longitude: 115.91763209358216,
    width: 25,
    height: 25,
  });
  that.data.markers.push({
    iconPath: 'http://img1.image.lfang.com/2014_03/201403271600027598.jpg',
    title: '王府井',

    id: 12,
    latitude: 28.655085775311985,
    longitude: 115.90532720088959,
    width: 25,
    height: 25
  });
  that.data.markers.push({
    iconPath: 'http://image.qmango.com/upload/2013816114926.jpg',
    title: '红谷桃园',

    id: 13,
    latitude: 28.66520618963856,
    longitude: 115.85351765155792,
    width: 35,
    height: 25
  });
  that.data.markers.push({
    iconPath: 'http://pic.shuoshuokong.com/d/file/2019-03/427ffd256058f9f4be7c139e2042dedc.png',
    title: '南昌航空大学',

    id: 15,
    latitude: 28.656926351254995,
    longitude:115.82887351512909,
    width: 35,
    height: 25
  });
  that.data.markers.push({
    iconPath: 'https://p1.ssl.qhimgs1.com/sdr/400__/t0190337a1dbdf3d56b.jpg',
    title: '豫章师范学院',

    id: 141,
    latitude: 28.662579682970268,
    longitude: 115.7783192396164,
    width: 25,
    height: 30
  });
  return that.data.markers;
},
//江西理工大学
setMarkersjxlgdx: function (la1, lo1, dis) {
  var that = this;
  that.data.markers=[];
  that.data.markers.push({
    iconPath: '../../image/0.gif',
    title: '南昌站',

    id: 151,
    latitude: 28.662991163527906,
    longitude: 115.91763209358216,
    width: 25,
    height: 25,
  });
  that.data.markers.push({
    iconPath: '../../image/1.gif',
    title: '检测大厦',

    id: 152,
    latitude: 28.66371,
    longitude: 115.92804,
    width: 25,
    height: 25
  });
  that.data.markers.push({
    iconPath: 'http://storage.travel.sina.com.cn/jingdian/201309181811596690_20120223_164610_jdtupload_1557_0.jpg',
    title: '青山湖景区',

    id: 153,
    latitude: 28.693688345437906,
    longitude: 115.92312525764466,
    width: 35,
    height: 25
  });
  that.data.markers.push({
    iconPath: 'http://n.sinaimg.cn/sinacn20190624s/74/w500h374/20190624/7466-hyvnhqq4940774.jpg',
    title: '英雄大桥',

    id: 154,
    latitude: 28.714432490959112,
    longitude: 115.9147747094345,
    width: 25,
    height: 30
  });
  that.data.markers.push({
    iconPath: 'http://jiangxi.sinaimg.cn/2014/0730/U8827P1332DT20140730145833.png',
    title: '孔目湖',

    id: 155,
    latitude: 28.738840131557982,
    longitude: 115.88743227073668,
    width: 30,
    height: 25
  });
  that.data.markers.push({
    iconPath: "../../image/jxlg1.gif",
    title: "江西理工大学",

    id: 156,
    latitude: 28.74154104464624,
    longitude: 115.876900067482,
    width: 25,
    height: 25
  });
  that.data.markers.push({
    iconPath: "../../image/location.png",
    title: dis,

    id: 6,
    latitude:la1,
    longitude: lo1,
    width: 25,
    height: 25
  });
  return that.data.markers;
},

//江西科技学院
setMarkersjxkjxy: function (la1, lo1, dis) {
  var that = this;
  that.data.markers=[];
  that.data.markers.push({
    iconPath: '../../image/0.gif',
    title: '南昌站',

    id: 31,
    latitude: 28.662991163527906,
    longitude: 115.91763209358216,
    width: 25,
    height: 25,
  });
  that.data.markers.push({
    iconPath: 'https://img1.qunarzz.com/piao/fusion/2007/d5/5edb23c20d0e7c02.jpg_r_480x360x95_abe5fccf.jpg',
    title: '南昌海洋公园',

    id: 32,
    latitude: 28.674374911957738,
    longitude: 115.9773337841034,
    width: 25,
    height: 25
  });
  /*that.data.markers.push({
    iconPath: '../../image/2.gif',
    title: '太子殿',

    id: 33,
    latitude: 28.67479379232362,
    longitude: 116.01111888885498,
    width: 35,
    height: 25
  });*/
  that.data.markers.push({
    iconPath: 'http://www.gov.cn/xinwen/site1/20140517/a41f726a4b0614e0e0bd01.jpg',
    title: '江西科技学院',

    id: 241,
    latitude: 28.676229268513236,
    longitude:116.01725041866302,
    width: 25,
    height: 30
  });
  return that.data.markers;
},
//江西服装学院
setMarkersjxfzxy: function (la1, lo1, dis) {
  var that = this;
  that.data.markers=[];
  that.data.markers.push({
    iconPath: '../../image/0.gif',
    title: '南昌站',

    id: 251,
    latitude: 28.662991163527906,
    longitude: 115.91763209358216,
    width: 25,
    height: 25,
  });
  that.data.markers.push({
    iconPath: 'https://p3.ssl.qhimgs1.com/sdr/400__/t01949be9e8fc6991dd.png',
    title: '徐坊客运站',

    id: 252,
    latitude: 28.647021694741763,
    longitude: 115.91082572937012,
    width: 25,
    height: 25
  });
  that.data.markers.push({
    iconPath: 'https://bbs-fd.zol-img.com.cn/t_s1200x5000/g4/M01/04/0E/Cg-4WlJQzsCIEcK1AAsM_FIogEAAAMSuwJR_JsACw0U178.jpg',
    title: '八大山人梅湖景区',

    id: 253,
    latitude: 28.60298549794596,
    longitude: 115.91979503631592,
    width: 35,
    height: 25
  });
  that.data.markers.push({
    iconPath: 'https://p0.ssl.qhimgs1.com/sdr/400__/t019e2a10676f82e0e4.jpg',
    title: '橙碧湖公园',

    id: 254,
    latitude: 28.550129001255765,
    longitude:115.9353518486023,
    width: 25,
    height: 30
  });
  that.data.markers.push({
    iconPath: 'https://p1.ssl.qhimgs1.com/sdr/400__/t0136887164bdd70cdb.jpg',
    title: '江西服装学院',

    id: 255,
    latitude: 28.45348665672414,
    longitude:115.95189571380615,
    width: 25,
    height: 30
  });
  return that.data.markers;
},
//南昌工学院
setMarkersncgxy: function (la1, lo1, dis) {
  var that = this;
  that.data.markers=[];
  that.data.markers.push({
    iconPath: '../../image/0.gif',
    title: '南昌站',

    id: 11,
    latitude: 28.662991163527906,
    longitude: 115.91763209358216,
    width: 25,
    height: 25,
  });
  that.data.markers.push({
    iconPath: 'http://img1.image.lfang.com/2014_03/201403271600027598.jpg',
    title: '王府井',

    id: 12,
    latitude: 28.655085775311985,
    longitude: 115.90532720088959,
    width: 25,
    height: 25
  });
  that.data.markers.push({
    iconPath: 'http://image.qmango.com/upload/2013816114926.jpg',
    title: '红谷桃园',

    id: 13,
    latitude: 28.66520618963856,
    longitude: 115.85351765155792,
    width: 35,
    height: 25
  });
  that.data.markers.push({
    iconPath: 'http://pic.shuoshuokong.com/d/file/2019-03/427ffd256058f9f4be7c139e2042dedc.png',
    title: '南昌航空大学',

    id: 15,
    latitude: 28.656926351254995,
    longitude:115.82887351512909,
    width: 35,
    height: 25
  });
  that.data.markers.push({
    iconPath: 'http://bbs-fd.zol-img.com.cn/t_s1200x5000/g5/M00/04/0A/ChMkJ1wB0DqIeAY0AANaLwmHznwAAtgtgI_kMcAA1pH210.jpg',
    title: '南昌大学',

    id: 14,
    latitude: 28.656427374780094,
    longitude: 115.80183148384094,
    width: 25,
    height: 30
  });
  that.data.markers.push({
    iconPath: 'http://img.mp.sohu.com/upload/20170624/6301f7c165e74312be845c0072ca3fa7_th.png',
    title: '南昌工学院',

    id: 271,
    latitude:28.610892843578814,
    longitude: 115.76314866542816,
    width: 25,
    height: 30
  });
  return that.data.markers;
},
//南昌理工学院
setMarkersnclgxy: function (la1, lo1, dis) {
  var that = this;
  that.data.markers=[];
  that.data.markers.push({
    iconPath: '../../image/0.gif',
    title: '南昌站',

    id: 151,
    latitude: 28.662991163527906,
    longitude: 115.91763209358216,
    width: 25,
    height: 25,
  });
  that.data.markers.push({
    iconPath: '../../image/1.gif',
    title: '检测大厦',

    id: 152,
    latitude: 28.66371,
    longitude: 115.92804,
    width: 25,
    height: 25
  });
  that.data.markers.push({
    iconPath: 'http://storage.travel.sina.com.cn/jingdian/201309181811596690_20120223_164610_jdtupload_1557_0.jpg',
    title: '青山湖景区',

    id: 153,
    latitude: 28.693688345437906,
    longitude: 115.92312525764466,
    width: 35,
    height: 25
  });
  that.data.markers.push({
    iconPath: 'http://n.sinaimg.cn/sinacn20190624s/74/w500h374/20190624/7466-hyvnhqq4940774.jpg',
    title: '英雄大桥',

    id: 154,
    latitude: 28.714432490959112,
    longitude: 115.9147747094345,
    width: 25,
    height: 30
  });
  that.data.markers.push({
    iconPath: 'http://jiangxi.sinaimg.cn/2014/0730/U8827P1332DT20140730145833.png',
    title: '孔目湖',

    id: 155,
    latitude: 28.738840131557982,
    longitude: 115.88743227073668,
    width: 30,
    height: 25
  });
  that.data.markers.push({
    iconPath: 'http://img.gaokaohelp.com/article/172/2_20180802140824_qj4z2.png',
    title: '江西财经大学',

    id: 41,
    latitude: 28.74330288028242,
    longitude: 115.85465490818024,
    width: 30,
    height: 25
  });
  that.data.markers.push({
    iconPath: 'http://5b0988e595225.cdn.sohucs.com/images/20180114/512af7a0817d484aafc957a102bb3e6b.jpeg',
    title: '南昌理工学院',

    id: 281,
    latitude: 28.780829510134545,
    longitude:115.85687577724457,
    width: 30,
    height: 25
  });
  return that.data.markers;
},

    setMarkers: function (la1, lo1, dis) {
      var that = this;
      that.data.markers=[];
      that.data.markers.push({
        iconPath: '../../image/0.gif',
        title: '南昌站',
  
        id: 0,
        latitude: 28.662991163527906,
        longitude: 115.91763209358216,
        width: 25,
        height: 25,
      });
      that.data.markers.push({
        iconPath: '../../image/1.gif',
        title: '检测大厦',
  
        id: 1,
        latitude: 28.66371,
        longitude: 115.92804,
        width: 25,
        height: 25
      });
      that.data.markers.push({
        iconPath: '../../image/2.gif',
        title: '青山湖景区',
  
        id: 2,
        latitude: 28.693688345437906,
        longitude: 115.92312525764466,
        width: 35,
        height: 25
      });
      that.data.markers.push({
        iconPath: '../../image/6.gif',
        title: '英雄大桥',
  
        id: 3,
        latitude: 28.714432490959112,
        longitude: 115.9147747094345,
        width: 25,
        height: 30
      });
      that.data.markers.push({
        iconPath: '../../image/8.gif',
        title: '孔目湖',
  
        id: 4,
        latitude: 28.738840131557982,
        longitude: 115.88743227073668,
        width: 30,
        height: 25
      });
      that.data.markers.push({
        iconPath: "../../image/jxlg1.gif",
        title: "江西理工大学",
  
        id: 5,
        latitude: 28.74154104464624,
        longitude: 115.876900067482,
        width: 25,
        height: 25
      });
      that.data.markers.push({
        iconPath: "../../image/location.png",
        title: dis,
  
        id: 6,
        latitude:la1,
        longitude: lo1,
        width: 25,
        height: 25
      });
      return that.data.markers;
    },


    markertap: function (e) {
      // 可以改变标记点的图片，也可以显示 一段 描述
      wx.showToast({
        title: "3"
      });
      console.log(e);
    },
    //图片跳转
    markertap(e) {
      var that = this;
      if (e.markerId == 0) {
        wx.navigateTo({
          url: '../../pages/ncz/ncz',
          success: function () {
            console.log('跳转成功')
          },
          fail: function () {
            console.log('跳转失败');
          }
        })
      }
      else if (e.markerId == 1) {
        wx.navigateTo({
          url: '../../pages/jc/jc',
          success: function () {
            console.log('跳转成功')
          },
          fail: function () {
            console.log('跳转失败');
          }
        })
      }
      else if (e.markerId == 2) {
        wx.navigateTo({
          url: '../../pages/qsh/qsh',
          success: function () {
            console.log('跳转成功')
          },
          fail: function () {
            console.log('跳转失败');
          }
        })
      }
      else if (e.markerId == 3) {
        wx.navigateTo({
          url: '../../pages/yxdq/yxdq',
          success: function () {
            console.log('跳转成功')
          },
          fail: function () {
            console.log('跳转失败');
          }
        })
      }
      else if (e.markerId == 4) {
        wx.navigateTo({
          url: '../../pages/kmh/kmh',
          success: function () {
            console.log('跳转成功')
          },
          fail: function () {
            console.log('跳转失败');
          }
        })
      }
      else if (e.markerId == 5) {
        wx.navigateTo({
          url: '../../pages/jxlg/jxlg',
          success: function () {
            console.log("跳转成功")
          },
          fail: function () {
            console.log("跳转失败")
          }
        })
      }
      else if (e.markerId == 7) {
        wx.navigateTo({
          url: '../../pages/ncdx/ncdx',
          success: function () {
            console.log("跳转成功")
          },
          fail: function () {
            console.log("跳转失败")
          }
        })
      }


  //南昌大学
      else if (e.markerId == 11) {
        wx.navigateTo({
          url: '../../pages/ncz/ncz',
          success: function () {
            console.log("跳转成功")
          },
          fail: function () {
            console.log("跳转失败")
          }
        })
      }else if (e.markerId == 12) {
        wx.navigateTo({
          url: '../../pages/wfj/wfj',
          success: function () {
            console.log("跳转成功")
          },
          fail: function () {
            console.log("跳转失败")
          }
        })
      }else if (e.markerId == 13) {
        wx.navigateTo({
          url: '../../pages/hgty/hgty',
          success: function () {
            console.log("跳转成功")
          },
          fail: function () {
            console.log("跳转失败")
          }
        })
      }else if (e.markerId == 14) {
        wx.navigateTo({
          url: '../../pages/ncdx/ncdx',
          success: function () {
            console.log("跳转成功")
          },
          fail: function () {
            console.log("跳转失败")
          }
        })
      }else if (e.markerId == 15) {
        wx.navigateTo({
          url: '../../pages/nchkdx/nchkdx',
          success: function () {
            console.log("跳转成功")
          },
          fail: function () {
            console.log("跳转失败")
          }
        })
      }
  //江西师范大学
  else if (e.markerId == 31) {
    wx.navigateTo({
      url: '../../pages/ncz/ncz',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }else if (e.markerId == 32) {
    wx.navigateTo({
      url: '../../pages/nchygy/nchygy',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }else if (e.markerId == 33) {
    wx.navigateTo({
      url: '../../pages/jxsfdx/jxsfdx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }/*else if (e.markerId == 34) {
    wx.navigateTo({
      url: '../../pages/ncdx/ncdx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }*/
  //江西财经大学
  else if (e.markerId == 41) {
    wx.navigateTo({
      url: '../../pages/jxcjdx/jxcjdx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }else if (e.markerId == 42) {
    wx.navigateTo({
      url: '../../pages/ncdx/ncdx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }else if (e.markerId == 43) {
    wx.navigateTo({
      url: '../../pages/ncdx/ncdx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }else if (e.markerId == 44) {
    wx.navigateTo({
      url: '../../pages/ncdx/ncdx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }
  //江西农业大学
  else if (e.markerId == 51) {
    wx.navigateTo({
      url: '../../pages/jxnydx/jxnydx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }else if (e.markerId == 52) {
    wx.navigateTo({
      url: '../../pages/ncdx/ncdx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }else if (e.markerId == 53) {
    wx.navigateTo({
      url: '../../pages/ncdx/ncdx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }else if (e.markerId == 54) {
    wx.navigateTo({
      url: '../../pages/ncdx/ncdx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }
  //江西中医药大学
  else if (e.markerId == 61) {
    wx.navigateTo({
      url: '../../pages/ncdx/ncdx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }else if (e.markerId == 62) {
    wx.navigateTo({
      url: '../../pages/ncdx/ncdx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }else if (e.markerId == 65) {
    wx.navigateTo({
      url: '../../pages/jxzyydx/jxzyydx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }else if (e.markerId == 66) {
    wx.navigateTo({
      url: '../../pages/yzsfxy/yzsfxy',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }
  //华东交通大学
  else if (e.markerId == 71) {
    wx.navigateTo({
      url: '../../pages/hdjtdx/hdjtdx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }else if (e.markerId == 72) {
    wx.navigateTo({
      url: '../../pages/ncdx/ncdx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }else if (e.markerId == 73) {
    wx.navigateTo({
      url: '../../pages/ncdx/ncdx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }else if (e.markerId == 74) {
    wx.navigateTo({
      url: '../../pages/ncdx/ncdx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }
  //东华理工大学
      else if (e.markerId == 81) {
        wx.navigateTo({
          url: '../../pages/ncz/ncz',
          success: function () {
            console.log('跳转成功')
          },
          fail: function () {
            console.log('跳转失败');
          }
        })
      }else if (e.markerId == 82) {
        wx.navigateTo({
          url: '../../pages/wfj/wfj',
          success: function () {
            console.log('跳转成功')
          },
          fail: function () {
            console.log('跳转失败');
          }
        })
      }else if (e.markerId == 85) {
        wx.navigateTo({
          url: '../../pages/lbhgy/lbhgy',
          success: function () {
            console.log('跳转成功')
          },
          fail: function () {
            console.log('跳转失败');
          }
        })
      }else if (e.markerId == 84) {
        wx.navigateTo({
          url: '../../pages/dhlgdx/dhlgdx',
          success: function () {
            console.log('跳转成功')
          },
          fail: function () {
            console.log('跳转失败');
          }
        })
      }
  //南昌航空大学
  else if (e.markerId == 91) {
    wx.navigateTo({
      url: '../../pages/ncdx/ncdx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }else if (e.markerId == 92) {
    wx.navigateTo({
      url: '../../pages/ncdx/ncdx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }else if (e.markerId == 93) {
    wx.navigateTo({
      url: '../../pages/ncdx/ncdx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }else if (e.markerId == 94) {
    wx.navigateTo({
      url: '../../pages/nchkdx/nchkdx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }
  //江西科技师范大学
  else if (e.markerId == 101) {
    wx.navigateTo({
      url: '../../pages/ncdx/ncdx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }else if (e.markerId == 102) {
    wx.navigateTo({
      url: '../../pages/ncdx/ncdx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }else if (e.markerId == 103) {
    wx.navigateTo({
      url: '../../pages/ncdx/ncdx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }else if (e.markerId == 104) {
    wx.navigateTo({
      url: '../../pages/jxkjsfdx/jxkjsfdx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }
  //南昌工程学院
  else if (e.markerId == 111) {
    wx.navigateTo({
      url: '../../pages/ncgcxy/ncgcxy',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }else if (e.markerId == 112) {
    wx.navigateTo({
      url: '../../pages/ncdx/ncdx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }else if (e.markerId == 113) {
    wx.navigateTo({
      url: '../../pages/ncdx/ncdx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }else if (e.markerId == 114) {
    wx.navigateTo({
      url: '../../pages/ncdx/ncdx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }
  //南昌师范学院
  else if (e.markerId == 121) {
    wx.navigateTo({
      url: '../../pages/ncsfxy/ncsfxy',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }else if (e.markerId == 122) {
    wx.navigateTo({
      url: '../../pages/ncdx/ncdx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }else if (e.markerId == 123) {
    wx.navigateTo({
      url: '../../pages/ncdx/ncdx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }else if (e.markerId == 124) {
    wx.navigateTo({
      url: '../../pages/ncdx/ncdx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }
  //江西警察学院
  else if (e.markerId == 131) {
    wx.navigateTo({
      url: '../../pages/ncdx/ncdx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }else if (e.markerId == 132) {
    wx.navigateTo({
      url: '../../pages/ncdx/ncdx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }else if (e.markerId == 133) {
    wx.navigateTo({
      url: '../../pages/ncdx/ncdx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }else if (e.markerId == 134) {
    wx.navigateTo({
      url: '../../pages/ncdx/ncdx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }
  //豫章师范学院
  else if (e.markerId == 141) {
    wx.navigateTo({
      url: '../../pages/yzsfxy/yzsfxy',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }else if (e.markerId == 142) {
    wx.navigateTo({
      url: '../../pages/ncdx/ncdx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }else if (e.markerId == 143) {
    wx.navigateTo({
      url: '../../pages/ncdx/ncdx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }else if (e.markerId == 144) {
    wx.navigateTo({
      url: '../../pages/ncdx/ncdx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }
  //江西理工大学
  else if (e.markerId == 151) {
    wx.navigateTo({
      url: '../../pages/ncz/ncz',
      success: function () {
        console.log('跳转成功')
      },
      fail: function () {
        console.log('跳转失败');
      }
    })
  }
  else if (e.markerId == 152) {
    wx.navigateTo({
      url: '../../pages/jc/jc',
      success: function () {
        console.log('跳转成功')
      },
      fail: function () {
        console.log('跳转失败');
      }
    })
  }
  else if (e.markerId == 153) {
    wx.navigateTo({
      url: '../../pages/qsh/qsh',
      success: function () {
        console.log('跳转成功')
      },
      fail: function () {
        console.log('跳转失败');
      }
    })
  }
  else if (e.markerId == 154) {
    wx.navigateTo({
      url: '../../pages/yxdq/yxdq',
      success: function () {
        console.log('跳转成功')
      },
      fail: function () {
        console.log('跳转失败');
      }
    })
  }
  else if (e.markerId == 155) {
    wx.navigateTo({
      url: '../../pages/kmh/kmh',
      success: function () {
        console.log('跳转成功')
      },
      fail: function () {
        console.log('跳转失败');
      }
    })
  }
  else if (e.markerId == 156) {
    wx.navigateTo({
      url: '../../pages/jxlg/jxlg',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }



  //江西科技学院
  else if (e.markerId == 241) {
    wx.navigateTo({
      url: '../../pages/jxkjxy/jxkjxy',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }else if (e.markerId == 242) {
    wx.navigateTo({
      url: '../../pages/ncdx/ncdx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }else if (e.markerId == 243) {
    wx.navigateTo({
      url: '../../pages/ncdx/ncdx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }else if (e.markerId == 244) {
    wx.navigateTo({
      url: '../../pages/ncdx/ncdx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }
  //江西服装学院
  else if (e.markerId == 251) {
    wx.navigateTo({
      url: '../../pages/ncz/ncz',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }else if (e.markerId == 252) {
    wx.navigateTo({
      url: '../../pages/xfkyz/xfkyz',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }else if (e.markerId == 253) {
    wx.navigateTo({
      url: '../../pages/bdsrmhjq/bdsrmhjq',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }else if (e.markerId == 254) {
    wx.navigateTo({
      url: '../../pages/cbhgy/cbhgy',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }else if (e.markerId == 255) {
    wx.navigateTo({
      url: '../../pages/jxfzxy/jxfzxy',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }
  //南昌工学院
  else if (e.markerId == 271) {
    wx.navigateTo({
      url: '../../pages/ncgxy/ncgxy',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }else if (e.markerId == 272) {
    wx.navigateTo({
      url: '../../pages/ncdx/ncdx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }else if (e.markerId == 273) {
    wx.navigateTo({
      url: '../../pages/ncdx/ncdx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }else if (e.markerId == 274) {
    wx.navigateTo({
      url: '../../pages/ncdx/ncdx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }
  //南昌理工学院
  else if (e.markerId == 281) {
    wx.navigateTo({
      url: '../../pages/nclgxy/nclgxy',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }else if (e.markerId == 282) {
    wx.navigateTo({
      url: '../../pages/ncdx/ncdx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }else if (e.markerId == 283) {
    wx.navigateTo({
      url: '../../pages/ncdx/ncdx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }else if (e.markerId == 284) {
    wx.navigateTo({
      url: '../../pages/ncdx/ncdx',
      success: function () {
        console.log("跳转成功")
      },
      fail: function () {
        console.log("跳转失败")
      }
    })
  }
    }
  })
  
  
  